package com.example.helloword;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

import com.example.helloword.utils.ConfigTile;
import com.example.helloword.utils.ConfigTileNinasHomeChilds;
import com.example.helloword.utils.ConfigTileTeresHome;

public class ShowPrimeActivity extends Activity {

	private ConfigTile configTileElegido;

	@Override
	public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.show_prime_activity_hw);

        Button boton = (Button)findViewById(R.id.btnNinasChildsHouse);
        boton.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				configTileElegido = new ConfigTileNinasHomeChilds();
				lanzarGuessActivity(v);
			}

		});

        boton = (Button)findViewById(R.id.btnTeresHouse);
        boton.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				configTileElegido = new ConfigTileTeresHome();
				lanzarGuessActivity(v);
			}

		});
        
    }

    public void lanzarGuessActivity(View view){
        Intent i = new Intent(this, GuessActivity.class);
        i.putExtra("ConfigTile", configTileElegido);
        startActivity(i);
    }

}